﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrandwayLib.Meters.Classes
{

    public enum SocketType
    {
        Server,
        Client
    }

    /// <summary>
    /// 嵌套字参数
    /// </summary>
    public class SocketParam
    {
        /// <summary>
        /// 无参构造器
        /// </summary>
        public SocketParam() { }

        /// <summary>
        /// 带有两个参数的构造器
        /// </summary>
        /// <param name="ipAddress">Ip地址</param>
        /// <param name="portNumber">端口号</param>
        public SocketParam(string ipAddress,int portNumber,SocketType socketType) {
            IpAddress = ipAddress;
            PortNumber = portNumber;
            SocketType = socketType;
        }

        /// <summary>
        /// Ip地址
        /// </summary>
        public string IpAddress { set; get; }

        /// <summary>
        /// 端口号
        /// </summary>
        public int PortNumber { set; get; }

        /// <summary>
        /// 嵌套字模式，服务端或客户端
        /// </summary>
        public SocketType SocketType { set; get; }
    }
}
